<template>
    <el-dialog :title="title" v-model="isShow" :width="width" :fullscreen="width==null" custom-class="test" destroy-on-close :close-on-click-modal="false" @close="onClose">
        <div v-if="isShow">
            <slot/>
        </div>
    </el-dialog>
</template>

<script>
export default {
    props: {
        title: {type: String, default: "标题"},
        width: {type: String, default: "80%"},
    },
    data() {
        return {
            isShow: false,
        }
    },
    beforeCreate() {
    },
    methods: {
        show() {
            this.isShow = true;
        },
        dismiss() {
            this.isShow = false;
        },
        onClose() {
            this.$emit("close");
        },
    },
}
</script>

<style scoped>
</style>
